package ly.sjun.design.prototype_pattern;

/**
 * @ClassName: Food
 * @Author: ly
 * @Date: 2023/2/3-9:27
 * @Description 食物抽象嘞
 **/
public abstract class Food implements Cloneable{

    protected abstract String show();

    private String id;

    protected String type;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getType() {
        return type;
    }

    @Override
    protected Object clone()  {
        Object clone = null;
        try {
            clone = super.clone();
        } catch (CloneNotSupportedException e) {
            e.printStackTrace();
        }
        return clone;
    }
}
